

/**
 * Implements the logical NOT operation on a packet filter. In other words, packets
 * pass this filter if they do not pass the supplied filter.
 *
 * @author Matt Tucker
 */
class NotFilter : public PacketFilter {
public:
    /**
     * Creates a NOT filter using the specified filter.
     *
     * @param filter the filter.
     */
    NotFilter(PacketFilter * filter) : filter(filter){}

    bool accept(Packet * packet) {
        return !filter->accept(packet);
    }
private:
	PacketFilter * filter;
}
